package com.huabo.system.service;

import com.hbfk.util.JsonBean;
import com.hbfk.util.PageInfo;
import com.huabo.system.mysql.entity.TblManageRightMySql;
import com.huabo.system.mysql.entity.TblManageUserRightMySql;
import com.huabo.system.mysql.entity.TblOrganizationMySql;
import com.huabo.system.oracle.entity.TblBiReportMenu;
import com.huabo.system.oracle.entity.TblManageRight;
import com.huabo.system.oracle.entity.TblManageUserRight;
import com.huabo.system.oracle.entity.TblOrganization;

import com.huabo.system.utils.Tree;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

public interface TblManageRightService {
    TblManageRight findById(String pri);

    TblManageRightMySql findByMySqlId(String pri);

    List<Tree> getOrgFatherRightforRedis(TblOrganization var1) throws Exception;

    List<Tree> getMySqlOrgFatherRightforRedis(TblOrganizationMySql var1) throws Exception;

    void findRightListBiDistribution(PageInfo<TblManageRight> pageInfo, BigDecimal orgid);

    void findMySqlRightListBiDistribution(PageInfo<TblManageRightMySql> pageInfo, BigDecimal orgid);

    void distributionPageIdByRightId(String[] rightids, String[] pageids, BigDecimal orgid);

    Map<String,Object>  findRightListbyModule(String token, String staffId);

    String getTreeListSettingMenu(BigDecimal tmplId, Map<BigDecimal, Object> map, String token, String staffId);

    List<TblManageRight> findByManageParentId(BigDecimal fatherrightid, String token, String staffId) throws Exception;

    List<TblManageRightMySql> findByMySqlManageParentId(BigDecimal fatherrightid, String token, String staffId) throws Exception;

    TblManageRight findByRightname(String rightname);

    TblManageRightMySql findByMySqlRightname(String rightname);

    String getRightForUser(String token, String staffId);

    void delright(TblManageRight vmr);

    void distributionPageIdByRightIdTwo(String[] rightids, String[] pageids, BigDecimal attribute, String pid);

    String GetTree(String staffid, Map<BigDecimal, Object> map, String orgid);

    JsonBean findRightLIstByUser(String token, Integer rightId) throws Exception;

    JsonBean findChildrenRightListByUser(String token, Integer rightId) throws Exception;

	JsonBean saveManageRight(TblManageRight right, String token) throws Exception;

    JsonBean saveMySqlManageRight(TblManageRightMySql right, String token) throws Exception;

	JsonBean findRightEntityById(BigDecimal rightId) throws Exception;

	JsonBean modifyManageRight(TblManageRight right, String token) throws Exception;

    JsonBean modifyMySqlManageRight(TblManageRightMySql right, String token) throws Exception;

	JsonBean removeManageRight(BigDecimal rightId) throws Exception;

    void grantScreenRight(String userid, String priid);

    void save(TblManageRight viewTblManageRight);

    void saveMySql(TblManageRightMySql viewTblManageRight);

    List<TblManageRight> findByUserAll(String userid);

    List<TblManageRightMySql> findByMySqlUserAll(String userid);

    void updateright(TblManageRight tblManageRight);

    void updateMySqlright(TblManageRightMySql tblManageRight);

    void inserUserRight(TblManageUserRight userRight);

    void inserMySqlUserRight(TblManageUserRightMySql userRight);

    List<TblManageRight> findByorgid(BigDecimal id);

    List<TblManageRightMySql> findByMySqlorgid(BigDecimal id);
    
    public List<TblBiReportMenu> findBiReportList(BigDecimal orgid, BigDecimal rightid) throws Exception;
}
